package com.tjsoft.system.entity.base;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.tjsoft.system.entity.IdEntity;

/**
 * 微型企业自有资金使用情况表明细
 * @author Administrator
 *
 */
@Entity
@Table(name = "T_SYS_MoneyItem")
public class Moneyitem extends IdEntity implements Comparable<Moneyitem>{

	@ManyToOne
	@JoinColumn(name="selfmoney_id")
	private Selfmoney selfmoney;//自有资金
	private String serialNo;//序号
	@Temporal(TemporalType.DATE)
	private Date useDate;
	private String useFor;//使用项目
	private double amount;//金额
	private String payMethod;//支付方式
	private String payFor;//支付对象
	private String bank;//开户行
	private String bankNo;//银行账号
	
	public int compareTo(Moneyitem item) {
		if(this.id<item.getId()){
			return -1;
		}else if(this.id==item.getId()){
			return 0;
		}else{
			return 1;
		}
	}
	
	public Selfmoney getSelfmoney() {
		return selfmoney;
	}
	public void setSelfmoney(Selfmoney selfmoney) {
		this.selfmoney = selfmoney;
	}
	public String getSerialNo() {
		return serialNo;
	}
	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}
	public Date getUseDate() {
		return useDate;
	}
	public void setUseDate(Date useDate) {
		this.useDate = useDate;
	}
	public String getUseFor() {
		return useFor;
	}
	public void setUseFor(String useFor) {
		this.useFor = useFor;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public String getPayMethod() {
		return payMethod;
	}
	public void setPayMethod(String payMethod) {
		this.payMethod = payMethod;
	}
	public String getPayFor() {
		return payFor;
	}
	public void setPayFor(String payFor) {
		this.payFor = payFor;
	}
	public String getBank() {
		return bank;
	}
	public void setBank(String bank) {
		this.bank = bank;
	}
	public String getBankNo() {
		return bankNo;
	}
	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}
}
